(0) Obligation:

The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y)
*(@x, @y) → #mult(@x, @y)
-(@x, @y) → #sub(@x, @y)
div(@x, @y) → #div(@x, @y)
eratos(@l) → eratos#1(@l)
eratos#1(::(@x, @xs)) → ::(@x, eratos(filter(@x, @xs)))
eratos#1(nil) → nil
filter(@p, @l) → filter#1(@l, @p)
filter#1(::(@x, @xs), @p) → filter#2(filter(@p, @xs), @p, @x)
filter#1(nil, @p) → nil
filter#2(@xs', @p, @x) → filter#3(#equal(mod(@x, @p), #0), @x, @xs')
filter#3(#false, @x, @xs') → ::(@x, @xs')
filter#3(#true, @x, @xs') → @xs'
mod(@x, @y) → -(@x, *(@x, div(@x, @y)))

The (relative) TRS S consists of the following rules:

#add(#0, @y) → @y
#add(#neg(#s(#0)), @y) → #pred(@y)
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y))
#add(#pos(#s(#0)), @y) → #succ(@y)
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y))
#and(#false, #false) → #false
#and(#false, #true) → #false
#and(#true, #false) → #false
#and(#true, #true) → #true
#div(#0, #0) → #divByZero
#div(#0, #neg(@y)) → #0
#div(#0, #pos(@y)) → #0
#div(#neg(@x), #0) → #divByZero
#div(#neg(@x), #neg(@y)) → #pos(#natdiv(@x, @y))
#div(#neg(@x), #pos(@y)) → #neg(#natdiv(@x, @y))
#div(#pos(@x), #0) → #divByZero
#div(#pos(@x), #neg(@y)) → #neg(#natdiv(@x, @y))
#div(#pos(@x), #pos(@y)) → #pos(#natdiv(@x, @y))
#eq(#0, #0) → #true
#eq(#0, #neg(@y)) → #false
#eq(#0, #pos(@y)) → #false
#eq(#0, #s(@y)) → #false
#eq(#neg(@x), #0) → #false
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y)
#eq(#neg(@x), #pos(@y)) → #false
#eq(#pos(@x), #0) → #false
#eq(#pos(@x), #neg(@y)) → #false
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y)
#eq(#s(@x), #0) → #false
#eq(#s(@x), #s(@y)) → #eq(@x, @y)
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
#eq(::(@x_1, @x_2), nil) → #false
#eq(nil, ::(@y_1, @y_2)) → #false
#eq(nil, nil) → #true
#mult(#0, #0) → #0
#mult(#0, #neg(@y)) → #0
#mult(#0, #pos(@y)) → #0
#mult(#neg(@x), #0) → #0
#mult(#neg(@x), #neg(@y)) → #pos(#natmult(@x, @y))
#mult(#neg(@x), #pos(@y)) → #neg(#natmult(@x, @y))
#mult(#pos(@x), #0) → #0
#mult(#pos(@x), #neg(@y)) → #neg(#natmult(@x, @y))
#mult(#pos(@x), #pos(@y)) → #pos(#natmult(@x, @y))
#natdiv(#0, #0) → #divByZero
#natdiv(#s(@x), #s(@y)) → #s(#natdiv(#natsub(@x, @y), #s(@y)))
#natmult(#0, @y) → #0
#natmult(#s(@x), @y) → #add(#pos(@y), #natmult(@x, @y))
#natsub(@x, #0) → @x
#natsub(#s(@x), #s(@y)) → #natsub(@x, @y)
#pred(#0) → #neg(#s(#0))
#pred(#neg(#s(@x))) → #neg(#s(#s(@x)))
#pred(#pos(#s(#0))) → #0
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x))
#sub(@x, #0) → @x
#sub(@x, #neg(@y)) → #add(@x, #pos(@y))
#sub(@x, #pos(@y)) → #add(@x, #neg(@y))
#succ(#0) → #pos(#s(#0))
#succ(#neg(#s(#0))) → #0
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x))
#succ(#pos(#s(@x))) → #pos(#s(#s(@x)))

Rewrite Strategy: INNERMOST

(1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed relative TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
*(@x, @y) → #mult(@x, @y) [1]
-(@x, @y) → #sub(@x, @y) [1]
div(@x, @y) → #div(@x, @y) [1]
eratos(@l) → eratos#1(@l) [1]
eratos#1(::(@x, @xs)) → ::(@x, eratos(filter(@x, @xs))) [1]
eratos#1(nil) → nil [1]
filter(@p, @l) → filter#1(@l, @p) [1]
filter#1(::(@x, @xs), @p) → filter#2(filter(@p, @xs), @p, @x) [1]
filter#1(nil, @p) → nil [1]
filter#2(@xs', @p, @x) → filter#3(#equal(mod(@x, @p), #0), @x, @xs') [1]
filter#3(#false, @x, @xs') → ::(@x, @xs') [1]
filter#3(#true, @x, @xs') → @xs' [1]
mod(@x, @y) → -(@x, *(@x, div(@x, @y))) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#div(#0, #0) → #divByZero [0]
#div(#0, #neg(@y)) → #0 [0]
#div(#0, #pos(@y)) → #0 [0]
#div(#neg(@x), #0) → #divByZero [0]
#div(#neg(@x), #neg(@y)) → #pos(#natdiv(@x, @y)) [0]
#div(#neg(@x), #pos(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #0) → #divByZero [0]
#div(#pos(@x), #neg(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #pos(@y)) → #pos(#natdiv(@x, @y)) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#mult(#0, #0) → #0 [0]
#mult(#0, #neg(@y)) → #0 [0]
#mult(#0, #pos(@y)) → #0 [0]
#mult(#neg(@x), #0) → #0 [0]
#mult(#neg(@x), #neg(@y)) → #pos(#natmult(@x, @y)) [0]
#mult(#neg(@x), #pos(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #0) → #0 [0]
#mult(#pos(@x), #neg(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #pos(@y)) → #pos(#natmult(@x, @y)) [0]
#natdiv(#0, #0) → #divByZero [0]
#natdiv(#s(@x), #s(@y)) → #s(#natdiv(#natsub(@x, @y), #s(@y))) [0]
#natmult(#0, @y) → #0 [0]
#natmult(#s(@x), @y) → #add(#pos(@y), #natmult(@x, @y)) [0]
#natsub(@x, #0) → @x [0]
#natsub(#s(@x), #s(@y)) → #natsub(@x, @y) [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#sub(@x, #0) → @x [0]
#sub(@x, #neg(@y)) → #add(@x, #pos(@y)) [0]
#sub(@x, #pos(@y)) → #add(@x, #neg(@y)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]

Rewrite Strategy: INNERMOST

(3) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID) transformation)

Renamed defined symbols to avoid conflicts with arithmetic symbols:

* => times
- => minus

(4) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
times(@x, @y) → #mult(@x, @y) [1]
minus(@x, @y) → #sub(@x, @y) [1]
div(@x, @y) → #div(@x, @y) [1]
eratos(@l) → eratos#1(@l) [1]
eratos#1(::(@x, @xs)) → ::(@x, eratos(filter(@x, @xs))) [1]
eratos#1(nil) → nil [1]
filter(@p, @l) → filter#1(@l, @p) [1]
filter#1(::(@x, @xs), @p) → filter#2(filter(@p, @xs), @p, @x) [1]
filter#1(nil, @p) → nil [1]
filter#2(@xs', @p, @x) → filter#3(#equal(mod(@x, @p), #0), @x, @xs') [1]
filter#3(#false, @x, @xs') → ::(@x, @xs') [1]
filter#3(#true, @x, @xs') → @xs' [1]
mod(@x, @y) → minus(@x, times(@x, div(@x, @y))) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#div(#0, #0) → #divByZero [0]
#div(#0, #neg(@y)) → #0 [0]
#div(#0, #pos(@y)) → #0 [0]
#div(#neg(@x), #0) → #divByZero [0]
#div(#neg(@x), #neg(@y)) → #pos(#natdiv(@x, @y)) [0]
#div(#neg(@x), #pos(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #0) → #divByZero [0]
#div(#pos(@x), #neg(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #pos(@y)) → #pos(#natdiv(@x, @y)) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#mult(#0, #0) → #0 [0]
#mult(#0, #neg(@y)) → #0 [0]
#mult(#0, #pos(@y)) → #0 [0]
#mult(#neg(@x), #0) → #0 [0]
#mult(#neg(@x), #neg(@y)) → #pos(#natmult(@x, @y)) [0]
#mult(#neg(@x), #pos(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #0) → #0 [0]
#mult(#pos(@x), #neg(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #pos(@y)) → #pos(#natmult(@x, @y)) [0]
#natdiv(#0, #0) → #divByZero [0]
#natdiv(#s(@x), #s(@y)) → #s(#natdiv(#natsub(@x, @y), #s(@y))) [0]
#natmult(#0, @y) → #0 [0]
#natmult(#s(@x), @y) → #add(#pos(@y), #natmult(@x, @y)) [0]
#natsub(@x, #0) → @x [0]
#natsub(#s(@x), #s(@y)) → #natsub(@x, @y) [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#sub(@x, #0) → @x [0]
#sub(@x, #neg(@y)) → #add(@x, #pos(@y)) [0]
#sub(@x, #pos(@y)) → #add(@x, #neg(@y)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]

Rewrite Strategy: INNERMOST

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
times(@x, @y) → #mult(@x, @y) [1]
minus(@x, @y) → #sub(@x, @y) [1]
div(@x, @y) → #div(@x, @y) [1]
eratos(@l) → eratos#1(@l) [1]
eratos#1(::(@x, @xs)) → ::(@x, eratos(filter(@x, @xs))) [1]
eratos#1(nil) → nil [1]
filter(@p, @l) → filter#1(@l, @p) [1]
filter#1(::(@x, @xs), @p) → filter#2(filter(@p, @xs), @p, @x) [1]
filter#1(nil, @p) → nil [1]
filter#2(@xs', @p, @x) → filter#3(#equal(mod(@x, @p), #0), @x, @xs') [1]
filter#3(#false, @x, @xs') → ::(@x, @xs') [1]
filter#3(#true, @x, @xs') → @xs' [1]
mod(@x, @y) → minus(@x, times(@x, div(@x, @y))) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#div(#0, #0) → #divByZero [0]
#div(#0, #neg(@y)) → #0 [0]
#div(#0, #pos(@y)) → #0 [0]
#div(#neg(@x), #0) → #divByZero [0]
#div(#neg(@x), #neg(@y)) → #pos(#natdiv(@x, @y)) [0]
#div(#neg(@x), #pos(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #0) → #divByZero [0]
#div(#pos(@x), #neg(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #pos(@y)) → #pos(#natdiv(@x, @y)) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#mult(#0, #0) → #0 [0]
#mult(#0, #neg(@y)) → #0 [0]
#mult(#0, #pos(@y)) → #0 [0]
#mult(#neg(@x), #0) → #0 [0]
#mult(#neg(@x), #neg(@y)) → #pos(#natmult(@x, @y)) [0]
#mult(#neg(@x), #pos(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #0) → #0 [0]
#mult(#pos(@x), #neg(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #pos(@y)) → #pos(#natmult(@x, @y)) [0]
#natdiv(#0, #0) → #divByZero [0]
#natdiv(#s(@x), #s(@y)) → #s(#natdiv(#natsub(@x, @y), #s(@y))) [0]
#natmult(#0, @y) → #0 [0]
#natmult(#s(@x), @y) → #add(#pos(@y), #natmult(@x, @y)) [0]
#natsub(@x, #0) → @x [0]
#natsub(#s(@x), #s(@y)) → #natsub(@x, @y) [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#sub(@x, #0) → @x [0]
#sub(@x, #neg(@y)) → #add(@x, #pos(@y)) [0]
#sub(@x, #pos(@y)) → #add(@x, #neg(@y)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]

The TRS has the following type information:
#equal :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → #false:#true
#eq :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → #false:#true
times :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#mult :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
minus :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#sub :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
div :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#div :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
eratos :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
eratos#1 :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
:: :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
filter :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
nil :: :::nil:#0:#s:#neg:#pos:#divByZero
filter#1 :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
filter#2 :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
filter#3 :: #false:#true → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
mod :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#0 :: :::nil:#0:#s:#neg:#pos:#divByZero
#false :: #false:#true
#true :: #false:#true
#add :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#neg :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#s :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#pred :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#pos :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#succ :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#and :: #false:#true → #false:#true → #false:#true
#divByZero :: :::nil:#0:#s:#neg:#pos:#divByZero
#natdiv :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#natmult :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero
#natsub :: :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero → :::nil:#0:#s:#neg:#pos:#divByZero

Rewrite Strategy: INNERMOST

(7) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


eratos
eratos#1

(c) The following functions are completely defined:

filter
times
div
#equal
mod
filter#1
minus
filter#2
filter#3
#add
#and
#div
#eq
#mult
#natdiv
#natmult
#natsub
#pred
#sub
#succ

Due to the following rules being added:

#add(v0, v1) → null_#add [0]
#and(v0, v1) → null_#and [0]
#div(v0, v1) → null_#div [0]
#eq(v0, v1) → null_#eq [0]
#mult(v0, v1) → null_#mult [0]
#natdiv(v0, v1) → null_#natdiv [0]
#natmult(v0, v1) → null_#natmult [0]
#natsub(v0, v1) → null_#natsub [0]
#pred(v0) → null_#pred [0]
#sub(v0, v1) → null_#sub [0]
#succ(v0) → null_#succ [0]
filter#1(v0, v1) → null_filter#1 [0]
filter#3(v0, v1, v2) → null_filter#3 [0]

And the following fresh constants:

null_#add, null_#and, null_#div, null_#eq, null_#mult, null_#natdiv, null_#natmult, null_#natsub, null_#pred, null_#sub, null_#succ, null_filter#1, null_filter#3

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
times(@x, @y) → #mult(@x, @y) [1]
minus(@x, @y) → #sub(@x, @y) [1]
div(@x, @y) → #div(@x, @y) [1]
eratos(@l) → eratos#1(@l) [1]
eratos#1(::(@x, @xs)) → ::(@x, eratos(filter(@x, @xs))) [1]
eratos#1(nil) → nil [1]
filter(@p, @l) → filter#1(@l, @p) [1]
filter#1(::(@x, @xs), @p) → filter#2(filter(@p, @xs), @p, @x) [1]
filter#1(nil, @p) → nil [1]
filter#2(@xs', @p, @x) → filter#3(#equal(mod(@x, @p), #0), @x, @xs') [1]
filter#3(#false, @x, @xs') → ::(@x, @xs') [1]
filter#3(#true, @x, @xs') → @xs' [1]
mod(@x, @y) → minus(@x, times(@x, div(@x, @y))) [1]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(#add(#pos(#s(@x)), @y)) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(#add(#pos(#s(@x)), @y)) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#div(#0, #0) → #divByZero [0]
#div(#0, #neg(@y)) → #0 [0]
#div(#0, #pos(@y)) → #0 [0]
#div(#neg(@x), #0) → #divByZero [0]
#div(#neg(@x), #neg(@y)) → #pos(#natdiv(@x, @y)) [0]
#div(#neg(@x), #pos(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #0) → #divByZero [0]
#div(#pos(@x), #neg(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #pos(@y)) → #pos(#natdiv(@x, @y)) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#mult(#0, #0) → #0 [0]
#mult(#0, #neg(@y)) → #0 [0]
#mult(#0, #pos(@y)) → #0 [0]
#mult(#neg(@x), #0) → #0 [0]
#mult(#neg(@x), #neg(@y)) → #pos(#natmult(@x, @y)) [0]
#mult(#neg(@x), #pos(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #0) → #0 [0]
#mult(#pos(@x), #neg(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #pos(@y)) → #pos(#natmult(@x, @y)) [0]
#natdiv(#0, #0) → #divByZero [0]
#natdiv(#s(@x), #s(@y)) → #s(#natdiv(#natsub(@x, @y), #s(@y))) [0]
#natmult(#0, @y) → #0 [0]
#natmult(#s(@x), @y) → #add(#pos(@y), #natmult(@x, @y)) [0]
#natsub(@x, #0) → @x [0]
#natsub(#s(@x), #s(@y)) → #natsub(@x, @y) [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#sub(@x, #0) → @x [0]
#sub(@x, #neg(@y)) → #add(@x, #pos(@y)) [0]
#sub(@x, #pos(@y)) → #add(@x, #neg(@y)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]
#add(v0, v1) → null_#add [0]
#and(v0, v1) → null_#and [0]
#div(v0, v1) → null_#div [0]
#eq(v0, v1) → null_#eq [0]
#mult(v0, v1) → null_#mult [0]
#natdiv(v0, v1) → null_#natdiv [0]
#natmult(v0, v1) → null_#natmult [0]
#natsub(v0, v1) → null_#natsub [0]
#pred(v0) → null_#pred [0]
#sub(v0, v1) → null_#sub [0]
#succ(v0) → null_#succ [0]
filter#1(v0, v1) → null_filter#1 [0]
filter#3(v0, v1, v2) → null_filter#3 [0]

The TRS has the following type information:
#equal :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → #false:#true:null_#and:null_#eq
#eq :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → #false:#true:null_#and:null_#eq
times :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#mult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
minus :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#sub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
div :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#div :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
eratos :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
eratos#1 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
:: :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
nil :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter#1 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter#2 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter#3 :: #false:#true:null_#and:null_#eq → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
mod :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#0 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#false :: #false:#true:null_#and:null_#eq
#true :: #false:#true:null_#and:null_#eq
#add :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#neg :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#s :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#pred :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#pos :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#succ :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#and :: #false:#true:null_#and:null_#eq → #false:#true:null_#and:null_#eq → #false:#true:null_#and:null_#eq
#divByZero :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#natdiv :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#natmult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#natsub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#add :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#and :: #false:#true:null_#and:null_#eq
null_#div :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#eq :: #false:#true:null_#and:null_#eq
null_#mult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#natdiv :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#natmult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#natsub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#pred :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#sub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#succ :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_filter#1 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_filter#3 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3

Rewrite Strategy: INNERMOST

(9) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(10) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
times(@x, @y) → #mult(@x, @y) [1]
minus(@x, @y) → #sub(@x, @y) [1]
div(@x, @y) → #div(@x, @y) [1]
eratos(@l) → eratos#1(@l) [1]
eratos#1(::(@x, @xs)) → ::(@x, eratos(filter#1(@xs, @x))) [2]
eratos#1(nil) → nil [1]
filter(@p, @l) → filter#1(@l, @p) [1]
filter#1(::(@x, @xs), @p) → filter#2(filter#1(@xs, @p), @p, @x) [2]
filter#1(nil, @p) → nil [1]
filter#2(@xs', @p, @x) → filter#3(#equal(minus(@x, times(@x, div(@x, @p))), #0), @x, @xs') [2]
filter#3(#false, @x, @xs') → ::(@x, @xs') [1]
filter#3(#true, @x, @xs') → @xs' [1]
mod(@x, @y) → minus(@x, times(@x, #div(@x, @y))) [2]
#add(#0, @y) → @y [0]
#add(#neg(#s(#0)), @y) → #pred(@y) [0]
#add(#neg(#s(#s(#0))), @y) → #pred(#succ(@y)) [0]
#add(#neg(#s(#s(#s(@x')))), @y) → #pred(#succ(#add(#pos(#s(@x')), @y))) [0]
#add(#neg(#s(#s(@x))), @y) → #pred(null_#add) [0]
#add(#pos(#s(#0)), @y) → #succ(@y) [0]
#add(#pos(#s(#s(#0))), @y) → #succ(#succ(@y)) [0]
#add(#pos(#s(#s(#s(@x'')))), @y) → #succ(#succ(#add(#pos(#s(@x'')), @y))) [0]
#add(#pos(#s(#s(@x))), @y) → #succ(null_#add) [0]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#div(#0, #0) → #divByZero [0]
#div(#0, #neg(@y)) → #0 [0]
#div(#0, #pos(@y)) → #0 [0]
#div(#neg(@x), #0) → #divByZero [0]
#div(#neg(@x), #neg(@y)) → #pos(#natdiv(@x, @y)) [0]
#div(#neg(@x), #pos(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #0) → #divByZero [0]
#div(#pos(@x), #neg(@y)) → #neg(#natdiv(@x, @y)) [0]
#div(#pos(@x), #pos(@y)) → #pos(#natdiv(@x, @y)) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#mult(#0, #0) → #0 [0]
#mult(#0, #neg(@y)) → #0 [0]
#mult(#0, #pos(@y)) → #0 [0]
#mult(#neg(@x), #0) → #0 [0]
#mult(#neg(@x), #neg(@y)) → #pos(#natmult(@x, @y)) [0]
#mult(#neg(@x), #pos(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #0) → #0 [0]
#mult(#pos(@x), #neg(@y)) → #neg(#natmult(@x, @y)) [0]
#mult(#pos(@x), #pos(@y)) → #pos(#natmult(@x, @y)) [0]
#natdiv(#0, #0) → #divByZero [0]
#natdiv(#s(@x), #s(#0)) → #s(#natdiv(@x, #s(#0))) [0]
#natdiv(#s(#s(@x145)), #s(#s(@y143))) → #s(#natdiv(#natsub(@x145, @y143), #s(#s(@y143)))) [0]
#natdiv(#s(@x), #s(@y)) → #s(#natdiv(null_#natsub, #s(@y))) [0]
#natmult(#0, @y) → #0 [0]
#natmult(#s(#0), @y) → #add(#pos(@y), #0) [0]
#natmult(#s(#s(@x146)), @y) → #add(#pos(@y), #add(#pos(@y), #natmult(@x146, @y))) [0]
#natmult(#s(@x), @y) → #add(#pos(@y), null_#natmult) [0]
#natsub(@x, #0) → @x [0]
#natsub(#s(@x), #s(@y)) → #natsub(@x, @y) [0]
#pred(#0) → #neg(#s(#0)) [0]
#pred(#neg(#s(@x))) → #neg(#s(#s(@x))) [0]
#pred(#pos(#s(#0))) → #0 [0]
#pred(#pos(#s(#s(@x)))) → #pos(#s(@x)) [0]
#sub(@x, #0) → @x [0]
#sub(@x, #neg(@y)) → #add(@x, #pos(@y)) [0]
#sub(@x, #pos(@y)) → #add(@x, #neg(@y)) [0]
#succ(#0) → #pos(#s(#0)) [0]
#succ(#neg(#s(#0))) → #0 [0]
#succ(#neg(#s(#s(@x)))) → #neg(#s(@x)) [0]
#succ(#pos(#s(@x))) → #pos(#s(#s(@x))) [0]
#add(v0, v1) → null_#add [0]
#and(v0, v1) → null_#and [0]
#div(v0, v1) → null_#div [0]
#eq(v0, v1) → null_#eq [0]
#mult(v0, v1) → null_#mult [0]
#natdiv(v0, v1) → null_#natdiv [0]
#natmult(v0, v1) → null_#natmult [0]
#natsub(v0, v1) → null_#natsub [0]
#pred(v0) → null_#pred [0]
#sub(v0, v1) → null_#sub [0]
#succ(v0) → null_#succ [0]
filter#1(v0, v1) → null_filter#1 [0]
filter#3(v0, v1, v2) → null_filter#3 [0]

The TRS has the following type information:
#equal :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → #false:#true:null_#and:null_#eq
#eq :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → #false:#true:null_#and:null_#eq
times :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#mult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
minus :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#sub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
div :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#div :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
eratos :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
eratos#1 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
:: :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
nil :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter#1 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter#2 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
filter#3 :: #false:#true:null_#and:null_#eq → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
mod :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#0 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#false :: #false:#true:null_#and:null_#eq
#true :: #false:#true:null_#and:null_#eq
#add :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#neg :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#s :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#pred :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#pos :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#succ :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#and :: #false:#true:null_#and:null_#eq → #false:#true:null_#and:null_#eq → #false:#true:null_#and:null_#eq
#divByZero :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#natdiv :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#natmult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
#natsub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3 → :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#add :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#and :: #false:#true:null_#and:null_#eq
null_#div :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#eq :: #false:#true:null_#and:null_#eq
null_#mult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#natdiv :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#natmult :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#natsub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#pred :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#sub :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_#succ :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_filter#1 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3
null_filter#3 :: :::nil:#0:#s:#neg:#pos:#divByZero:null_#add:null_#div:null_#mult:null_#natdiv:null_#natmult:null_#natsub:null_#pred:null_#sub:null_#succ:null_filter#1:null_filter#3

Rewrite Strategy: INNERMOST

(11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

nil => 2
#0 => 0
#false => 1
#true => 2
#divByZero => 1
null_#add => 0
null_#and => 0
null_#div => 0
null_#eq => 0
null_#mult => 0
null_#natdiv => 0
null_#natmult => 0
null_#natsub => 0
null_#pred => 0
null_#sub => 0
null_#succ => 0
null_filter#1 => 0
null_filter#3 => 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ @y :|: z' = @y, z = 0, @y >= 0
#add(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#add(z, z') -{ 0 }→ #succ(@y) :|: z = 1 + (1 + 0), z' = @y, @y >= 0
#add(z, z') -{ 0 }→ #succ(0) :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0
#add(z, z') -{ 0 }→ #succ(#succ(@y)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + @x''), @y))) :|: z = 1 + (1 + (1 + (1 + @x''))), z' = @y, @x'' >= 0, @y >= 0
#add(z, z') -{ 0 }→ #pred(@y) :|: z = 1 + (1 + 0), z' = @y, @y >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0
#add(z, z') -{ 0 }→ #pred(#succ(@y)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + @x'), @y))) :|: z = 1 + (1 + (1 + (1 + @x'))), z' = @y, @y >= 0, @x' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' = 1 + @y, @y >= 0
#div(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#div(z, z') -{ 0 }→ 1 + #natdiv(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#eq(z, z') -{ 0 }→ #eq(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 1 + @y, @y >= 0
#mult(z, z') -{ 0 }→ 0 :|: @x >= 0, z = 1 + @x, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#mult(z, z') -{ 0 }→ 1 + #natmult(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(@x, 1 + 0) :|: @x >= 0, z = 1 + @x, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(#natsub(@x145, @y143), 1 + (1 + @y143)) :|: z = 1 + (1 + @x145), @y143 >= 0, @x145 >= 0, z' = 1 + (1 + @y143)
#natmult(z, z') -{ 0 }→ 0 :|: z' = @y, z = 0, @y >= 0
#natmult(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#natmult(z, z') -{ 0 }→ #add(1 + @y, 0) :|: z = 1 + 0, z' = @y, @y >= 0
#natmult(z, z') -{ 0 }→ #add(1 + @y, 0) :|: @x >= 0, z = 1 + @x, z' = @y, @y >= 0
#natmult(z, z') -{ 0 }→ #add(1 + @y, #add(1 + @y, #natmult(@x146, @y))) :|: @x146 >= 0, z' = @y, z = 1 + (1 + @x146), @y >= 0
#natsub(z, z') -{ 0 }→ @x :|: z = @x, @x >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#natsub(z, z') -{ 0 }→ #natsub(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#pred(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#sub(z, z') -{ 0 }→ @x :|: z = @x, @x >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#sub(z, z') -{ 0 }→ #add(@x, 1 + @y) :|: z = @x, @x >= 0, z' = 1 + @y, @y >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#succ(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
div(z, z') -{ 1 }→ #div(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
eratos(z) -{ 1 }→ eratos#1(@l) :|: z = @l, @l >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(@l, @p) :|: z = @p, @p >= 0, @l >= 0, z' = @l
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, @p), @p, @x) :|: @p >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' = @p
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, @p >= 0, z' = @p
filter#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(@x, times(@x, div(@x, @p))), 0), @x, @xs') :|: @p >= 0, @x >= 0, @xs' >= 0, z = @xs', z'' = @x, z' = @p
filter#3(z, z', z'') -{ 1 }→ @xs' :|: z = 2, z'' = @xs', @x >= 0, @xs' >= 0, z' = @x
filter#3(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + @x + @xs' :|: z'' = @xs', @x >= 0, @xs' >= 0, z = 1, z' = @x
minus(z, z') -{ 1 }→ #sub(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
mod(z, z') -{ 2 }→ minus(@x, times(@x, #div(@x, @y))) :|: z = @x, @x >= 0, z' = @y, @y >= 0
times(z, z') -{ 1 }→ #mult(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0

(13) InliningProof (UPPER BOUND(ID) transformation)

Inlined the following terminating rules on right-hand sides where appropriate:

filter#3(z, z', z'') -{ 1 }→ 1 + @x + @xs' :|: z'' = @xs', @x >= 0, @xs' >= 0, z = 1, z' = @x
filter#3(z, z', z'') -{ 1 }→ @xs' :|: z = 2, z'' = @xs', @x >= 0, @xs' >= 0, z' = @x
filter#3(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#succ(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#succ(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

(14) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ @y :|: z' = @y, z = 0, @y >= 0
#add(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @y = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' = @y, @y >= 0, v0 >= 0, @y = v0
#add(z, z') -{ 0 }→ 0 :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), 1 + (1 + @x) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), v0 >= 0, 1 + (1 + @x) = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x), v0 >= 0, 1 + (1 + (1 + @x)) = v0
#add(z, z') -{ 0 }→ 0 :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, v0 >= 0, @y = v0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x) :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), @x' >= 0, 1 + (1 + @x) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x), @x' >= 0, 1 + (1 + (1 + @x)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @y = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: @x >= 0, z' = @y, z = 1 + (1 + (1 + @x)), @y >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, v0 >= 0, @y = v0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + 0), z' = @y, @y >= 0, @x >= 0, @y = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x)), @x' >= 0, 1 + (1 + @x) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x), @x' >= 0, 1 + (1 + (1 + @x)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + @x''), @y))) :|: z = 1 + (1 + (1 + (1 + @x''))), z' = @y, @x'' >= 0, @y >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, v0 >= 0, @y = v0
#add(z, z') -{ 0 }→ #pred(1 + (1 + @x)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + (1 + @x))
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @y = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + @x))) :|: z' = @y, z = 1 + (1 + (1 + 0)), @y >= 0, @x >= 0, @y = 1 + (1 + @x)
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + @x'), @y))) :|: z = 1 + (1 + (1 + (1 + @x'))), z' = @y, @y >= 0, @x' >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' = 1 + @y, @y >= 0
#div(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#div(z, z') -{ 0 }→ 1 + #natdiv(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#eq(z, z') -{ 0 }→ #eq(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 1 + @y, @y >= 0
#mult(z, z') -{ 0 }→ 0 :|: @x >= 0, z = 1 + @x, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#mult(z, z') -{ 0 }→ 1 + #natmult(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(@x, 1 + 0) :|: @x >= 0, z = 1 + @x, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(#natsub(@x145, @y143), 1 + (1 + @y143)) :|: z = 1 + (1 + @x145), @y143 >= 0, @x145 >= 0, z' = 1 + (1 + @y143)
#natmult(z, z') -{ 0 }→ 0 :|: z' = @y, z = 0, @y >= 0
#natmult(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#natmult(z, z') -{ 0 }→ #add(1 + @y, 0) :|: z = 1 + 0, z' = @y, @y >= 0
#natmult(z, z') -{ 0 }→ #add(1 + @y, 0) :|: @x >= 0, z = 1 + @x, z' = @y, @y >= 0
#natmult(z, z') -{ 0 }→ #add(1 + @y, #add(1 + @y, #natmult(@x146, @y))) :|: @x146 >= 0, z' = @y, z = 1 + (1 + @x146), @y >= 0
#natsub(z, z') -{ 0 }→ @x :|: z = @x, @x >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#natsub(z, z') -{ 0 }→ #natsub(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#pred(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
#sub(z, z') -{ 0 }→ @x :|: z = @x, @x >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#sub(z, z') -{ 0 }→ #add(@x, 1 + @y) :|: z = @x, @x >= 0, z' = 1 + @y, @y >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#succ(z) -{ 0 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + (1 + (1 + @x))
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + @x)) :|: @x >= 0, z = 1 + (1 + @x)
div(z, z') -{ 1 }→ #div(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
eratos(z) -{ 1 }→ eratos#1(@l) :|: z = @l, @l >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(@l, @p) :|: z = @p, @p >= 0, @l >= 0, z' = @l
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, @p), @p, @x) :|: @p >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' = @p
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, @p >= 0, z' = @p
filter#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(@x, times(@x, div(@x, @p))), 0), @x, @xs') :|: @p >= 0, @x >= 0, @xs' >= 0, z = @xs', z'' = @x, z' = @p
filter#3(z, z', z'') -{ 1 }→ @xs' :|: z = 2, z'' = @xs', @x >= 0, @xs' >= 0, z' = @x
filter#3(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + @x + @xs' :|: z'' = @xs', @x >= 0, @xs' >= 0, z = 1, z' = @x
minus(z, z') -{ 1 }→ #sub(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
mod(z, z') -{ 2 }→ minus(@x, times(@x, #div(@x, @y))) :|: z = @x, @x >= 0, z' = @y, @y >= 0
times(z, z') -{ 1 }→ #mult(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0

(15) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(16) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(#natsub(z - 2, z' - 2), 1 + (1 + (z' - 2))) :|: z' - 2 >= 0, z - 2 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ #natsub(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

(17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ #natsub }
{ #and }
{ filter#3 }
{ #pred }
{ #succ }
{ #natdiv }
{ #eq }
{ #add }
{ #div }
{ #equal }
{ #natmult }
{ #sub }
{ div }
{ #mult }
{ minus }
{ times }
{ filter#2 }
{ mod }
{ filter#1 }
{ filter }
{ eratos, eratos#1 }

(18) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(#natsub(z - 2, z' - 2), 1 + (1 + (z' - 2))) :|: z' - 2 >= 0, z - 2 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ #natsub(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natsub}, {#and}, {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: #natsub
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(20) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(#natsub(z - 2, z' - 2), 1 + (1 + (z' - 2))) :|: z' - 2 >= 0, z - 2 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ #natsub(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natsub}, {#and}, {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: ?, size: O(n1) [z]

(21) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #natsub
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(22) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(#natsub(z - 2, z' - 2), 1 + (1 + (z' - 2))) :|: z' - 2 >= 0, z - 2 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ #natsub(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#and}, {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]

(23) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(24) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#and}, {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(26) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#and}, {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: ?, size: O(1) [2]

(27) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(28) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]

(29) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(30) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: filter#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z' + z''

(32) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {filter#3}, {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: ?, size: O(n1) [1 + z' + z'']

(33) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: filter#3
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(34) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']

(35) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(36) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #pred
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z

(38) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#pred}, {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: ?, size: O(n1) [2 + z]

(39) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #pred
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(40) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ #pred(0) :|: z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + 0)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (z' - 3))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ #pred(1 + (1 + (1 + (z' - 2)))) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]

(41) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(42) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]

(43) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #succ
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z

(44) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#succ}, {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: ?, size: O(n1) [2 + z]

(45) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #succ
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(46) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]

(47) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(48) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]

(49) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #natdiv
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z

(50) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natdiv}, {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: ?, size: O(n1) [1 + z]

(51) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #natdiv
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(52) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + #natdiv(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(s, 1 + (1 + (z' - 2))) :|: s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(0, 1 + (z' - 1)) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 + #natdiv(z - 1, 1 + 0) :|: z - 1 >= 0, z' = 1 + 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]

(53) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(54) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]

(55) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(56) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#eq}, {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: ?, size: O(1) [2]

(57) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(58) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]

(59) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(60) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]

(61) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: #add
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z + z'

(62) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#add}, {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: ?, size: O(n1) [2·z + z']

(63) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #add
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(64) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ #succ(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ #pred(#succ(#add(1 + (1 + (z - 4)), z'))) :|: z' >= 0, z - 4 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', 0) :|: z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#sub(z, z') -{ 0 }→ #add(z, 1 + (z' - 1)) :|: z >= 0, z' - 1 >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']

(65) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(66) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']

(67) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #div
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z

(68) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#div}, {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: ?, size: O(n1) [1 + z]

(69) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #div
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(70) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ #div(z, z') :|: z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, #div(z, z'))) :|: z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]

(71) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(72) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]

(73) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #equal
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(74) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#equal}, {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: ?, size: O(1) [2]

(75) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #equal
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(76) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]

(77) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(78) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]

(79) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using PUBS for: #natmult
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 2 + 4·z + 4·z·z' + 2·z'

(80) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#natmult}, {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: ?, size: O(n2) [2 + 4·z + 4·z·z' + 2·z']

(81) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #natmult
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(82) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + #natmult(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ #add(1 + z', #add(1 + z', #natmult(z - 2, z'))) :|: z - 2 >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']

(83) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(84) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']

(85) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #sub
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z + z'

(86) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#sub}, {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: ?, size: O(n1) [2·z + z']

(87) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #sub
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(88) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ #sub(z, z') :|: z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']

(89) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(90) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']

(91) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: div
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z

(92) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {div}, {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: ?, size: O(n1) [1 + z]

(93) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: div
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(94) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 2 }→ filter#3(#equal(minus(z'', times(z'', div(z'', z'))), 0), z'', z) :|: z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]

(95) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(96) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]

(97) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: #mult
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 1 + 4·z·z' + 2·z'

(98) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {#mult}, {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: ?, size: O(n2) [1 + 4·z·z' + 2·z']

(99) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #mult
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(100) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ #mult(z, z') :|: z >= 0, z' >= 0

Function symbols to be analyzed: {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']

(101) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(102) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']

(103) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: minus
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z + z'

(104) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {minus}, {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: ?, size: O(n1) [2·z + z']

(105) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: minus
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(106) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']

(107) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(108) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']

(109) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: times
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 1 + 4·z·z' + 2·z'

(110) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {times}, {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: ?, size: O(n2) [1 + 4·z·z' + 2·z']

(111) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: times
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(112) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 3 }→ filter#3(#equal(minus(z'', times(z'', s30)), 0), z'', z) :|: s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 2 }→ minus(z, times(z, s24)) :|: s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']

(113) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(114) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']

(115) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: filter#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z + z''

(116) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter#2}, {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: ?, size: O(n1) [1 + z + z'']

(117) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: filter#2
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 7

(118) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']

(119) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(120) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']

(121) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: mod
after applying outer abstraction to obtain an ITS,
resulting in: INF with polynomial bound: ?

(122) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {mod}, {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: ?, size: INF

(123) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: mod
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 4

(124) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF

(125) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(126) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF

(127) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: filter#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(128) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter#1}, {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: ?, size: O(n1) [z]

(129) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: filter#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 9·z

(130) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 2 }→ 1 + @x + eratos(filter#1(@xs, @x)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 1 }→ filter#1(z', z) :|: z >= 0, z' >= 0
filter#1(z, z') -{ 2 }→ filter#2(filter#1(@xs, z'), z', @x) :|: z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: O(n1) [1 + 9·z], size: O(n1) [z]

(131) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(132) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 3 + 9·@xs }→ 1 + @x + eratos(s38) :|: s38 >= 0, s38 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 2 + 9·z' }→ s39 :|: s39 >= 0, s39 <= 1 * z', z >= 0, z' >= 0
filter#1(z, z') -{ 10 + 9·@xs }→ s41 :|: s40 >= 0, s40 <= 1 * @xs, s41 >= 0, s41 <= 1 * s40 + 1 * @x + 1, z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: O(n1) [1 + 9·z], size: O(n1) [z]

(133) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: filter
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z'

(134) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 3 + 9·@xs }→ 1 + @x + eratos(s38) :|: s38 >= 0, s38 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 2 + 9·z' }→ s39 :|: s39 >= 0, s39 <= 1 * z', z >= 0, z' >= 0
filter#1(z, z') -{ 10 + 9·@xs }→ s41 :|: s40 >= 0, s40 <= 1 * @xs, s41 >= 0, s41 <= 1 * s40 + 1 * @x + 1, z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {filter}, {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: O(n1) [1 + 9·z], size: O(n1) [z]
filter: runtime: ?, size: O(n1) [z']

(135) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: filter
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + 9·z'

(136) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 3 + 9·@xs }→ 1 + @x + eratos(s38) :|: s38 >= 0, s38 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 2 + 9·z' }→ s39 :|: s39 >= 0, s39 <= 1 * z', z >= 0, z' >= 0
filter#1(z, z') -{ 10 + 9·@xs }→ s41 :|: s40 >= 0, s40 <= 1 * @xs, s41 >= 0, s41 <= 1 * s40 + 1 * @x + 1, z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: O(n1) [1 + 9·z], size: O(n1) [z]
filter: runtime: O(n1) [2 + 9·z'], size: O(n1) [z']

(137) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(138) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 3 + 9·@xs }→ 1 + @x + eratos(s38) :|: s38 >= 0, s38 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 2 + 9·z' }→ s39 :|: s39 >= 0, s39 <= 1 * z', z >= 0, z' >= 0
filter#1(z, z') -{ 10 + 9·@xs }→ s41 :|: s40 >= 0, s40 <= 1 * @xs, s41 >= 0, s41 <= 1 * s40 + 1 * @x + 1, z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: O(n1) [1 + 9·z], size: O(n1) [z]
filter: runtime: O(n1) [2 + 9·z'], size: O(n1) [z']

(139) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: eratos
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

Computed SIZE bound using CoFloCo for: eratos#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(140) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 3 + 9·@xs }→ 1 + @x + eratos(s38) :|: s38 >= 0, s38 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 2 + 9·z' }→ s39 :|: s39 >= 0, s39 <= 1 * z', z >= 0, z' >= 0
filter#1(z, z') -{ 10 + 9·@xs }→ s41 :|: s40 >= 0, s40 <= 1 * @xs, s41 >= 0, s41 <= 1 * s40 + 1 * @x + 1, z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed: {eratos,eratos#1}
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: O(n1) [1 + 9·z], size: O(n1) [z]
filter: runtime: O(n1) [2 + 9·z'], size: O(n1) [z']
eratos: runtime: ?, size: O(n1) [z]
eratos#1: runtime: ?, size: O(n1) [z]

(141) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: eratos
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 2 + 13·z + 9·z2

Computed RUNTIME bound using KoAT for: eratos#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 6 + 22·z + 9·z2

(142) Obligation:

Complexity RNTS consisting of the following rules:

#add(z, z') -{ 0 }→ s'' :|: s'' >= 0, s'' <= 1 * (1 + (1 + 0)) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ s1 :|: s1 >= 0, s1 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ s19 :|: s17 >= 0, s17 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s18 >= 0, s18 <= 1 * s17 + 2, s19 >= 0, s19 <= 1 * s18 + 2, z - 4 >= 0, z' >= 0
#add(z, z') -{ 0 }→ s2 :|: s2 >= 0, s2 <= 1 * (1 + (1 + (z' - 3))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ s22 :|: s20 >= 0, s20 <= 2 * (1 + (1 + (z - 4))) + 1 * z', s21 >= 0, s21 <= 1 * s20 + 2, s22 >= 0, s22 <= 1 * s21 + 2, z' >= 0, z - 4 >= 0
#add(z, z') -{ 0 }→ s3 :|: s3 >= 0, s3 <= 1 * (1 + (1 + (1 + (z' - 2)))) + 2, z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0
#add(z, z') -{ 0 }→ s4 :|: s4 >= 0, s4 <= 1 * 0 + 2, z = 1 + (1 + (1 + 0)), z' >= 0
#add(z, z') -{ 0 }→ z' :|: z = 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0, z' = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + 0), z' >= 0
#add(z, z') -{ 0 }→ 0 :|: z - 3 >= 0, z' >= 0, v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, 1 + (1 + 0) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, v0 >= 0, 1 + (1 + 0) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), v0 >= 0, 0 = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + 0)
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, v0 >= 0, 1 + (1 + (z' - 3)) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, v0 >= 0, 1 + (1 + (1 + (z' - 2))) = v0
#add(z, z') -{ 0 }→ 0 :|: z = 1 + (1 + (1 + 0)), z' >= 0, v0' >= 0, 0 = v0'
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + @x') :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + (1 + @x'))
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + 0), z' >= 0, z' = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z - 3 >= 0, z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 1 + (1 + 0), 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + 0) :|: z = 1 + (1 + (1 + 0)), z' >= 0, 0 = 0
#add(z, z') -{ 0 }→ 1 + (1 + (z' - 3)) :|: z = 1 + (1 + 0), z' >= 0, z' - 3 >= 0
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x)) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' = 0, @x >= 0, 1 + (1 + 0) = 1 + (1 + @x)
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 3 >= 0, @x' >= 0, 1 + (1 + (z' - 3)) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + @x')) :|: z = 1 + (1 + (1 + 0)), z' >= 0, z' - 2 >= 0, @x' >= 0, 1 + (1 + (1 + (z' - 2))) = 1 + (1 + @x')
#add(z, z') -{ 0 }→ 1 + (1 + (1 + (z' - 2))) :|: z = 1 + (1 + 0), z' >= 0, z' - 2 >= 0
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#div(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#div(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#div(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#div(z, z') -{ 0 }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s10 :|: s10 >= 0, s10 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s13 :|: s11 >= 0, s11 <= 2, s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z' = 2, z = 1 + @x_1 + @x_2, @x_2 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z = 2, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z = 0, z' - 1 >= 0
#mult(z, z') -{ 0 }→ 0 :|: z - 1 >= 0, z' = 0
#mult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#mult(z, z') -{ 0 }→ 1 + s25 :|: s25 >= 0, s25 <= 4 * (z - 1) + 4 * ((z - 1) * (z' - 1)) + 2 * (z' - 1) + 2, z - 1 >= 0, z' - 1 >= 0
#natdiv(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#natdiv(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natdiv(z, z') -{ 0 }→ 1 + s6 :|: s6 >= 0, s6 <= 1 * (z - 1) + 1, z - 1 >= 0, z' = 1 + 0
#natdiv(z, z') -{ 0 }→ 1 + s7 :|: s7 >= 0, s7 <= 1 * s + 1, s >= 0, s <= 1 * (z - 2), z' - 2 >= 0, z - 2 >= 0
#natdiv(z, z') -{ 0 }→ 1 + s8 :|: s8 >= 0, s8 <= 1 * 0 + 1, z - 1 >= 0, z' - 1 >= 0
#natmult(z, z') -{ 0 }→ s14 :|: s14 >= 0, s14 <= 2 * (1 + z') + 1 * 0, z = 1 + 0, z' >= 0
#natmult(z, z') -{ 0 }→ s15 :|: s15 >= 0, s15 <= 2 * (1 + z') + 1 * 0, z - 1 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ s28 :|: s26 >= 0, s26 <= 4 * (z - 2) + 4 * ((z - 2) * z') + 2 * z' + 2, s27 >= 0, s27 <= 2 * (1 + z') + 1 * s26, s28 >= 0, s28 <= 2 * (1 + z') + 1 * s27, z - 2 >= 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z = 0, z' >= 0
#natmult(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#natsub(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 1 * (z - 1), z - 1 >= 0, z' - 1 >= 0
#natsub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#natsub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#pred(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#pred(z) -{ 0 }→ 0 :|: z >= 0
#pred(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#pred(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#pred(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
#sub(z, z') -{ 0 }→ s16 :|: s16 >= 0, s16 <= 2 * z + 1 * (1 + (z' - 1)), z >= 0, z' - 1 >= 0
#sub(z, z') -{ 0 }→ z :|: z >= 0, z' = 0
#sub(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#succ(z) -{ 0 }→ 0 :|: z = 1 + (1 + 0)
#succ(z) -{ 0 }→ 0 :|: z >= 0
#succ(z) -{ 0 }→ 1 + (1 + 0) :|: z = 0
#succ(z) -{ 0 }→ 1 + (1 + (z - 3)) :|: z - 3 >= 0
#succ(z) -{ 0 }→ 1 + (1 + (1 + (z - 2))) :|: z - 2 >= 0
div(z, z') -{ 1 }→ s23 :|: s23 >= 0, s23 <= 1 * z + 1, z >= 0, z' >= 0
eratos(z) -{ 1 }→ eratos#1(z) :|: z >= 0
eratos#1(z) -{ 1 }→ 2 :|: z = 2
eratos#1(z) -{ 3 + 9·@xs }→ 1 + @x + eratos(s38) :|: s38 >= 0, s38 <= 1 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter(z, z') -{ 2 + 9·z' }→ s39 :|: s39 >= 0, s39 <= 1 * z', z >= 0, z' >= 0
filter#1(z, z') -{ 10 + 9·@xs }→ s41 :|: s40 >= 0, s40 <= 1 * @xs, s41 >= 0, s41 <= 1 * s40 + 1 * @x + 1, z' >= 0, @x >= 0, z = 1 + @x + @xs, @xs >= 0
filter#1(z, z') -{ 1 }→ 2 :|: z = 2, z' >= 0
filter#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
filter#2(z, z', z'') -{ 7 }→ s37 :|: s34 >= 0, s34 <= 4 * (s30 * z'') + 2 * s30 + 1, s35 >= 0, s35 <= 2 * z'' + 1 * s34, s36 >= 0, s36 <= 2, s37 >= 0, s37 <= 1 * z'' + 1 * z + 1, s30 >= 0, s30 <= 1 * z'' + 1, z' >= 0, z'' >= 0, z >= 0
filter#3(z, z', z'') -{ 1 }→ z'' :|: z = 2, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
filter#3(z, z', z'') -{ 1 }→ 1 + z' + z'' :|: z' >= 0, z'' >= 0, z = 1
minus(z, z') -{ 1 }→ s29 :|: s29 >= 0, s29 <= 2 * z + 1 * z', z >= 0, z' >= 0
mod(z, z') -{ 4 }→ s33 :|: s32 >= 0, s32 <= 4 * (s24 * z) + 2 * s24 + 1, s33 >= 0, s33 <= 2 * z + 1 * s32, s24 >= 0, s24 <= 1 * z + 1, z >= 0, z' >= 0
times(z, z') -{ 1 }→ s31 :|: s31 >= 0, s31 <= 4 * (z' * z) + 2 * z' + 1, z >= 0, z' >= 0

Function symbols to be analyzed:
Previous analysis results are:
#natsub: runtime: O(1) [0], size: O(n1) [z]
#and: runtime: O(1) [0], size: O(1) [2]
filter#3: runtime: O(1) [1], size: O(n1) [1 + z' + z'']
#pred: runtime: O(1) [0], size: O(n1) [2 + z]
#succ: runtime: O(1) [0], size: O(n1) [2 + z]
#natdiv: runtime: O(1) [0], size: O(n1) [1 + z]
#eq: runtime: O(1) [0], size: O(1) [2]
#add: runtime: O(1) [0], size: O(n1) [2·z + z']
#div: runtime: O(1) [0], size: O(n1) [1 + z]
#equal: runtime: O(1) [1], size: O(1) [2]
#natmult: runtime: O(1) [0], size: O(n2) [2 + 4·z + 4·z·z' + 2·z']
#sub: runtime: O(1) [0], size: O(n1) [2·z + z']
div: runtime: O(1) [1], size: O(n1) [1 + z]
#mult: runtime: O(1) [0], size: O(n2) [1 + 4·z·z' + 2·z']
minus: runtime: O(1) [1], size: O(n1) [2·z + z']
times: runtime: O(1) [1], size: O(n2) [1 + 4·z·z' + 2·z']
filter#2: runtime: O(1) [7], size: O(n1) [1 + z + z'']
mod: runtime: O(1) [4], size: INF
filter#1: runtime: O(n1) [1 + 9·z], size: O(n1) [z]
filter: runtime: O(n1) [2 + 9·z'], size: O(n1) [z']
eratos: runtime: O(n2) [2 + 13·z + 9·z2], size: O(n1) [z]
eratos#1: runtime: O(n2) [6 + 22·z + 9·z2], size: O(n1) [z]

(143) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(144) BOUNDS(1, n^2)